﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using KCL.Code.Business;

namespace KCL
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session[SessionManager.InSection] != null)
            {
                if ((int)Session[SessionManager.InSection] == 1)
                {
                    hplnkWelcome.Text = Session[SessionManager.Username].ToString();
                    return;
                }
            }
            Response.Redirect("~/Default.aspx");
        }

        protected void lnkbtnSignout_Click(object sender, EventArgs e)
        {
            Session.Abandon();
            Response.Redirect("~/Default.aspx");
        }
    }
}